package com.example.hao.qq;

import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.widget.ImageView;
import android.widget.TextView;

import com.bumptech.glide.Glide;

public class UserActivity extends AppCompatActivity {

    private static final String TAG = "UserActivity";
    private ImageView userIcon;
    private TextView userNick;
    private TextView userGender;
    private TextView userSign;
    private TextView consellation;
    private TextView userPhoneNum;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.user_item);

       initView();
       lodData();



    }

    private void lodData() {

        Intent intent = getIntent();
        String icon = intent.getStringExtra("头像");
        String Nick = intent.getStringExtra("昵称");
        String gender = intent.getStringExtra("性别");
        String height = intent.getStringExtra("身高");
        String constellation = intent.getStringExtra("星座");
        String age = intent.getStringExtra("年龄");
        Glide.with(this).load(icon).into(userIcon);
        userNick.setText(Nick);
        userGender.setText(gender);
        consellation.setText(constellation);
        userPhoneNum.setText(height);
        userSign.setText(age);

    }

    private void initView() {
        userIcon = findViewById(R.id.icon);
        userNick = findViewById(R.id.nick);
        userGender = findViewById(R.id.gender);
        userSign = findViewById(R.id.signature);
        consellation = findViewById(R.id.constellation);
        userPhoneNum = findViewById(R.id.phoneNum);
    }


}
